ast-is-empty
Find out, is nested array/object/string/AST tree is empty
Install
npm i ast-is-empty
Quick Take
import { strict as assert } from "assert";
import isEmpty from "ast-is-empty";
assert.equal(
isEmpty({
a: "",
}),
true
);
assert.equal(
isEmpty({
a: [""],
b: {
c: {
d: "",
},
},
}),
true
);
assert.equal(
isEmpty([
{
a: [""],
b: { c: { d: "" } },
},
"",
["", "", ""],
]),
true
);
Documentation
Please visit codsen.com for a full description of the API and examples.
Licence
MIT License
Copyright (c) 2010-2020 Roy Revelt and other contributors
